package com.xayy.mgt.model.vo;

import com.xayy.mgt.model.NodeTreeInfo;
import com.xayy.mgt.service.TreeNode;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author Nie
 * @version V1.0
 * @date 2023/8/14 15:31
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class NodeTreeInfoVo extends NodeTreeInfo implements TreeNode<NodeTreeInfoVo, Long>, Serializable {
    private String name;

    private Map<String,Object> label;

    private List<NodeTreeInfoVo> children;

    @Override
    public List<NodeTreeInfoVo> getChildList() {
        return this.children;
    }

    @Override
    public void setNodeLevel(int level) {
        super.setLevel(level);
    }

    @Override
    public void setChildList(List<NodeTreeInfoVo> childList) {
        this.children = childList;

    }

    @Override
    public Long obtainId() {
        return super.getId();
    }

    @Override
    public Long obtainParentId() {
        return super.getParentId();
    }
}
